package org.example.new_hbps_backend_reconstruction.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import org.example.new_hbps_backend_reconstruction.entity.BloodOxygenLogsEntity;

import java.time.LocalDate;
import java.util.List;

/**
 * @author 丁利军
 * @date 2025年10月15日 21:50
 * @description 血氧相关服务接口
 */
public interface BloodOxygenLogsService {

    BloodOxygenLogsEntity getLatestByPatientUid(Long patientUid);

    IPage<BloodOxygenLogsEntity> getPageByPatientUid(Long patientUid, int pageNum, int pageSize);

    List<BloodOxygenLogsEntity> getByPatientUidAndDate(Long patientUid, LocalDate date);

    List<BloodOxygenLogsEntity> getAllByPatientUid(Long patientUid);

    Long countByPatientUidAndDate(Long patientUid, LocalDate date);

    Double averageSpo2ByPatientUidAndDate(Long patientUid, LocalDate date);
}
